/*
 * Copyright (c) 2017, Li Bo/Alex Lee All rights reserved.
 * 
 * http://www.libo4dream.club/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
package com.hyts.bmsp.service.dictionary;


import com.hyts.bmsp.model.dictionary.DictionaryTypeModel;
import com.hyts.bmsp.model.dictionary.DictionaryTypeQueryDTO;
import com.hyts.bmsp.dao.dictionary.lDictionaryTypeDAO;
import com.jfinal.plugin.activerecord.Page;

/**
 * @ClassName: DictionaryTypeServiceImpl
 * @Description: 数据字典类型业务逻辑实现类
 * @author: LiBo/Alex Lee
 * @date: 2017年9月23日 下午8:55:07
 * @email: alexlibochn@china-pui.com.cn/alex.link@foxmail.com
 */
public class DictionaryTypeServiceImpl implements DictionaryTypeService {

	
	private static lDictionaryTypeDAO dao = new lDictionaryTypeDAO();

	/* (non Javadoc)
	 * @Title: findDictionaryTypeList
	 * @Description: 查询字典类型数据列表
	 * @param dto
	 * @return
	 * @see com.alex.jfinal.webapp.service.dictionary.DictionaryTypeService#findDictionaryTypeList(com.alex.jfinal.webapp.bean.dictionary.DictionaryTypeQueryDTO)
	 */
	@Override
	public Page<DictionaryTypeModel> findDictionaryTypeList(
			DictionaryTypeQueryDTO dto) {
		return dao.queryPOListByPage(dto);
	}

	/* (non Javadoc)
	 * @Title: loadDicTypeModel
	 * @Description: 加载单条数据字典类型模型
	 * @param model
	 * @return
	 * @see com.alex.jfinal.webapp.service.dictionary.DictionaryTypeService#loadDicTypeModel(com.alex.jfinal.webapp.bean.dictionary.DictionaryTypeModel)
	 */
	@Override
	public DictionaryTypeModel loadDicTypeModel(DictionaryTypeQueryDTO model) {
		return dao.loadPO(model);
	}

	/* (non Javadoc)
	 * @Title: editDicTypeModel
	 * @Description: 编辑数据字典类型模型
	 * @param dto
	 * @return
	 * @see com.alex.jfinal.webapp.service.dictionary.DictionaryTypeService#editDicTypeModel(com.alex.jfinal.webapp.bean.dictionary.DictionaryTypeViewDTO)
	 */
	@Override
	public boolean editDicTypeModel(DictionaryTypeQueryDTO dto) {
		return dao.editPO(dto);
	}

	/* (non Javadoc)
	 * @Title: addDicTypeModel
	 * @Description: 新增数据字典类型
	 * @param dto
	 * @return
	 * @see com.alex.jfinal.webapp.service.dictionary.DictionaryTypeService#addDicTypeModel(com.alex.jfinal.webapp.bean.dictionary.DictionaryTypeViewDTO)
	 */
	@Override
	public boolean addDicTypeModel(DictionaryTypeQueryDTO dto) {
		return dao.savePO(dto);
	}

	/* (non Javadoc)
	 * @Title: deleteDicTypeModel
	 * @Description: 删除数据字典类型模型操作
	 * @param dto
	 * @return
	 * @see com.alex.jfinal.webapp.service.dictionary.DictionaryTypeService#deleteDicTypeModel(com.alex.jfinal.webapp.bean.dictionary.DictionaryTypeQueryDTO)
	 */
	@Override
	public boolean deleteDicTypeModel(DictionaryTypeQueryDTO dto) {
		return dao.deletePO(dto);
	}

}
